#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.67])
AC_INIT([textstream], [0.1], [jack@jackkelly.name])
AC_CONFIG_AUX_DIR([auxfiles])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([src/textstream.c])
AM_INIT_AUTOMAKE([1.11 foreign -Wall -Werror subdir-objects])
AM_SILENT_RULES([yes])
LT_INIT([win32-dll])
AC_SUBST([LIBTOOL_DEPS])

AC_ARG_ENABLE(
  [example],
  [AS_HELP_STRING(
    [--enable-example],
    [Also build the example program @<:@default=no@:>@])],
  [:],
  [enable_example=no])
AM_CONDITIONAL([ENABLE_EXAMPLE], [test "$enable_example" = yes])

AC_ARG_WITH(
  [pkg-config-dir],
  [AS_HELP_STRING(
    [--with-pkg-config-dir=DIR],
    [Put pkg-config files in DIR @<:@default=LIBDIR/pkgconfig@:>@])],
  [pkgconfigdir=$withval],
  [pkgconfigdir=$libdir/pkgconfig])
AC_SUBST([pkgconfigdir])

# Checks for programs.
AC_PROG_CC_C99
AC_PROG_SED

# Checks for libraries.
PKG_CHECK_MODULES([GLib], [glib-2.0])
PKG_CHECK_MODULES([libfake437], [fake437])

# Checks for header files.

# Checks for typedefs, structures, and compiler characteristics.
AM_PROG_CC_C_O

# Checks for library functions.

AC_CONFIG_FILES([textstream.pc])
AC_CONFIG_FILES([Makefile doc/Makefile])
AC_OUTPUT
